    
<template>
  <div style="padding: 10px 15px">
    <div class="filter-container">
      <el-select
        v-if="this.logincpnid == 'system'"
        v-model="listQuery.cpnID"
        filterable
        clearable
        class="filter-item"
        placeholder="请选择企业"
        @change="CpnselectFn($event)"
        :filter-method="cpnmatch"
        @clear="cpnmatch"
      >
        <el-option
          v-for="item in cpnoptions"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
          <span v-html="item.label" />
        </el-option>
      </el-select>

      <el-select
        v-model="this.listQuery.payChannel"
        clearable
        filterable
        class="filter-item"
        placeholder="请选择渠道"
        @change="CpnselectAct($event)"
      >
        <el-option
          v-for="item in paytychanneloptions"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
          <span v-html="item.label" />
        </el-option>
      </el-select>

      <el-select
        v-model="listQuery.act"
        filterable
        clearable
        class="filter-item"
        style="width: 200px; margin-right: 10px"
        placeholder="请选择商户号"
        :filter-method="cpnactmatch"
        @clear="cpnactmatch"
      >
        <el-option
          v-for="item in cpnactlstoptions"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
          <span v-html="item.label" />
        </el-option>
      </el-select>
      <el-button
        class="filter-item seachbttn"
        type="primary"
        icon="el-icon-search"
        @click="handleFilter"
        >查询</el-button
      >
    </div>
    <div
      class="filter_fenge"
      style="border: none; border-top: 1px solid #d1ddeb"
    />
    <div class="filter-container">
      <el-button
        class="filter-item bttnleft"
        style="margin-left: 10px"
        type="primary"
        icon="el-icon-edit"
        @click="handleCreate"
        >新增</el-button
      >
      <el-button
        class="filter-item"
        type="danger"
        icon="el-icon-delete"
        @click="deleteClick()"
        >删除</el-button
      >
    </div>
    <!--table-->
    <el-table
      ref="multipleTable"
      v-loading="listLoading"
      :data="sttlmntRc_Data"
      fit
      highlight-current-row
      style="width: 100%"
      stripe
      @selection-change="handleSelectionChange"
    >
      <el-table-column type="selection" width="55" />

      <el-table-column label="企业名称" align="left" min-width="150px">
        <template slot-scope="{ row }">
          <span>{{ row.cpnIDStr }}</span>
        </template>
      </el-table-column>

      <el-table-column label="主商户号" align="left" min-width="150px">
        <template slot-scope="{ row }">
          <span>{{ row.act }}</span>
        </template>
      </el-table-column>

      <el-table-column label="通道" align="left" min-width="150px">
        <template slot-scope="{ row }">
          <span>{{ row.payChannelStr }}</span>
        </template>
      </el-table-column>
      <el-table-column label="生效日期" align="left" min-width="120px">
        <template slot-scope="{ row }">
          <span>{{ row.dtStr }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作人" align="left" min-width="150px">
        <template slot-scope="{ row }">
          <span>{{ row.crtIDStr }}</span>
        </template>
      </el-table-column>

      <el-table-column fixed="right" label="操作" width="200">
        <template slot-scope="scope">
          <el-button type="primary" size="mini" @click="handleClick(scope.row)"
            >编辑</el-button
          >
          <el-button
            type="primary"
            size="mini"
            @click="handleClickhsy(scope.row)"
            >变更历史</el-button
          >
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="listQuery.total > 0"
      :total="listQuery.total"
      :page.sync="listQuery.page"
      :limit.sync="listQuery.limit"
      @pagination="fetchData(this)"
    />

    <!--table-->
    <!--弹出层 sttlmntRc模块-->
    <el-dialog
      title="分账详情"
      :visible.sync="dialogFormVisible"
      width="60%"
      :before-close="handleClose"
      :show-close="false"
    >
      <el-form
        :model="sttlmntRc_form"
        ref="refSaveForm"
        :inline="true"
        label-position="right"
        :hide-required-asterisk="false"
        :show-message="false"
      >
        <el-form-item label="分账企业：" prop="CpnID">
          <el-select
            v-if="this.logincpnid == 'system'"
            :disabled="this.sttlmntRc_form.isedit"
            v-model="sttlmntRc_form.CpnID"
            filterable
            clearable
            class="filter-item"
            placeholder=""
            @change="CpnselectFn($event)"
            :filter-method="cpnmatch"
            @clear="cpnmatch"
          >
            <el-option
              v-for="item in cpnoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
              <span v-html="item.label" />
            </el-option>
          </el-select>
          <label> 分账渠道：</label>
          <el-select
            :disabled="this.sttlmntRc_form.isedit"
            v-model="sttlmntRc_form.PayChannel"
            clearable
            filterable
            class="filter-item"
            placeholder=""
            @change="CpnselectAct($event)"
          >
            <el-option
              v-for="item in paytychanneloptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
              <span v-html="item.label" />
            </el-option>
          </el-select>

          <label> 分账收款主账户：</label>
          <el-select
            :disabled="this.sttlmntRc_form.isedit"
            v-model="sttlmntRc_form.Act"
            filterable
            clearable
            class="filter-item"
            style="width: 200px; margin-right: 10px"
            placeholder=""
            :filter-method="cpnactmatch"
            @clear="cpnactmatch"
          >
            <el-option
              v-for="item in cpnactlstoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
              <span v-html="item.label" />
            </el-option>
          </el-select>
        </el-form-item>

        <!--分账商户号列表-->
        <el-table
          :data="sttlmntRc_form.RCitem"
          fit
          highlight-current-row
          style="width: 100%"
        >
          <el-table-column type="index" label="序号"></el-table-column>
          <el-table-column label="分账商户号" min-width="150px">
            <template slot-scope="scope">
              <el-form-item :prop="`RCitem.${scope.$index}.RcActID`">
                <el-select
                  v-if="editRow == scope.$index && addRow == scope.$index"
                  v-model="scope.row.RcActID"
                  :rules="sttlmntRc_form.rules.RcActID"
                >
                  <el-option
                    v-for="item in cpnactlstoptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
                <span
                  v-else-if="scope.row.RcActID > 0"
                  :key="cpnactlstoptions.length"
                  >{{ cpnactlstoptionsdec[scope.row.RcActID] }}</span
                >
                <span v-else>无</span>
              </el-form-item>
            </template>
          </el-table-column>

          <el-table-column label="结算比例" min-width="120px">
            <template slot-scope="scope">
              <el-form-item
                prop="SttlmntProp"
                :rules="sttlmntRc_form.rules.SttlmntProp"
              >
                <el-input-number
                  v-if="editRow == scope.$index"
                  v-model="scope.row.SttlmntProp"
                  clearble
                  controls-position="right"
                  :min="1"
                  :max="100"
                  style="width: 100px"
                ></el-input-number>

                <span v-else>{{ scope.row.SttlmntProp }}</span>
              </el-form-item>
            </template>
          </el-table-column>
          <el-table-column fixed="right" label="操作" width="240px">
            <template slot-scope="scope">
              <el-button
                size="mini"
                @click="editOk(scope.row, scope.$index)"
                v-if="editRow != scope.$index"
                >编辑</el-button
              >
              <el-button
                size="mini"
                @click="saveRow"
                v-else-if="addRow == scope.$index || editRow == scope.$index"
                >保存</el-button
              >
              <el-button size="mini" @click="delList(scope.row, scope.$index)"
                >删除</el-button
              >
            </template>
          </el-table-column>
        </el-table>
        <br />
        <el-button
          @click="addList"
          :disabled="
            (addRow != -1 && sttlmntRc_form.RCitem.length > 0) ||
            sttlmntRc_form.CpnID.length == 0
          "
        >
          +加一行
        </el-button>
        <div class="sumlimitMny">
          结算比例总计：
          <span>
            <count-to
              :start-val="0"
              :end-val="this.allmony"
              :duration="2600"
              class="card-panel-num"
            />
          </span>
        </div>
        <br />
        <br />
        <el-form-item label="生效日期">
          <el-col :span="18">
            <el-date-picker
              v-model="sttlmntRc_form.Dt"
              type="date"
              placeholder="选择日期"
              style="width: 100%"
              format="yyyy-MM-dd"
            />
          </el-col>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="saveForm()">确 定</el-button>
      </div>
    </el-dialog>

    <el-dialog
      title="变更历史"
      :visible.sync="dialogFormVisible_hsy"
      width="70%"
      class="dialogFormVisible_hsy"
    >
      <!--table-->
      <el-table
        ref="multipleTable"
        v-loading="listLoading"
        :data="sttlmntRcLog_Data"
        fit
        highlight-current-row
        style="width: 100%"
        stripe
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55" />

        <el-table-column label="企业名称" align="left" min-width="150px">
          <template slot-scope="{ row }">
            <span>{{ row.cpnIDStr }}</span>
          </template>
        </el-table-column>

        <el-table-column label="主商户号" align="left" min-width="200px">
          <template slot-scope="{ row }">
            <span>{{ row.act }}</span>
          </template>
        </el-table-column>

        <el-table-column label="通道" align="left" min-width="180px">
          <template slot-scope="{ row }">
            <span>{{ row.payChannelStr }}</span>
          </template>
        </el-table-column>

        <el-table-column label="操作时间" align="left" min-width="180px">
          <template slot-scope="{ row }">
            <span>{{ row.crtTimeStr }}</span>
          </template>
        </el-table-column>

        <el-table-column label="生效日期" align="left" min-width="120px">
          <template slot-scope="{ row }">
            <span>{{ row.dtStr }}</span>
          </template>
        </el-table-column>

        <el-table-column label="操作前" align="left" min-width="400">
          <template slot-scope="{ row }">
            <span>{{ row.propTop }}</span>
          </template>
        </el-table-column>

        <el-table-column label="操作后" align="left" min-width="400">
          <template slot-scope="{ row }">
            <span>{{ row.propAfter }}</span>
          </template>
        </el-table-column>

        <el-table-column label="操作人" align="left" min-width="150px">
          <template slot-scope="{ row }">
            <span>{{ row.uptIDStr }}</span>
          </template>
        </el-table-column>
      </el-table>

      <div style="margin-top: 40px">
        <pagination
          v-show="listQuery_log.total > 0"
          :total="listQuery_log.total"
          :page.sync="listQuery_log.page"
          :limit.sync="listQuery_log.limit"
          @pagination="fetchData_log(this)"
          style="margin-top: -20px"
        />
      </div>
    </el-dialog>
  </div>
</template>

<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import { AjaxToken } from "@/api/common";
import { AjaxGet } from "@/api/common";
import { SelectAjax } from "@/api/common";
import sessionStorage from "@/api/Storage";
import "url-search-params-polyfill";
import PinYinMatch from "pinyin-match";
import countTo from "vue-count-to";
import commconfig from "@/comm.json";
import nestedRouter from "@/router/modules/nested";
export default {
  name: "Manager",
  components: {
    Pagination,
    countTo,
  },
  data() {
    return {
      loginid: "",
      logincpnid: "",
      allmony: 0,
      formLabelWidth: "120px",
      sttlmntRc_Data: null,
      sttlmntRcLog_Data: null,
      cpnoptions: [],
      cpnactlstoptions: [],
      cpnactlstoptionsdec: {},
      paytychanneloptions: [],
      dialogFormVisible_hsy: false,
      listQuery: {
        title: "",
        total: 0,
        page: 1,
        limit: 10,
        cpnID: "",
        payChannel: "",
        act: "",
      },
      listQuery_log: {
        title: "",
        total: 0,
        page: 1,
        limit: 10,
        sttid: "",
      },
      listLoading_log: true,
      listLoading: true,
      dialogFormVisible: false,
      dialogFormVisible: false,
      dialoRoleVisible: false,
      dialogPawssdVisible: false,
      dialogInfoVisible: false,
      dialogStatus: "",
      editRow: -1,
      addRow: -1,
      cpnSelectDisabled: false,
      isConfirm: false,
      sttlmntRc_form: {
        ID: "",
        CpnActID: "",
        CpnID: "",
        PayChannel: "",
        Act: "",
        SttlmntProp: "",
        Dt: "",
        RCitem: [],
        rules: {
          RcActID: [
            { required: true, message: "请选择分账商户号", trigger: "change" },
          ],
        },
        isedit: false,
        formTpye: 0,
        removeIdList: [],
        bindOrUnBindIdList: [],
      },
    };
  },
  mounted() {
    var userinfo = JSON.parse(sessionStorage.getItem("userinfo"));
    this.logincpnid = userinfo.cpnId;
    this.loginid = sessionStorage.getItem("id");
    this.sttlmntRc_form.CpnID = this.loginid == "system" ? "" : this.loginid;
  },
  created() {
    var userinfo = JSON.parse(sessionStorage.getItem("userinfo"));
    this.logincpnid = userinfo.cpnId;
    this.loginid = sessionStorage.getItem("id");
    this.sttlmntRc_form.CpnID = this.loginid == "system" ? "" : this.loginid;
    backstage.GeCpntListItems(this);
    backstage.GetPyChannelSelectListItems(this);
    this.fetchData();
  },
  methods: {
    /**
     * 清空列表
     */
    clearList() {
      this.sttlmntRc_form.RCitem = [];
      this.setRowIndex(-1);
    },
    /**
     * 添加一行
     */
    addList() {
      this.sttlmntRc_form.RCitem.push({
        RcActID: "",
        SttlmntProp: "",
        isNew: true,
        isUpdate: false,
      });
      this.setRowIndex(this.sttlmntRc_form.RCitem.length - 1);
    },
    saveRow(e) {
      debugger;
      //var reg = /^[\d|\.]*$/;
      //console.log("refSaveForm", this.$refs.refSaveForm);
      var allprop = 0;
      this.sttlmntRc_form.RCitem.forEach((x) => {
        allprop += parseInt(x.SttlmntProp);
      });
      this.allmony = allprop;
      if (allprop > 100) {
        this.$message({
          message: "比例上限超出100,请调整",
          type: "warning",
        });
      } else {
        this.$refs.refSaveForm.validate((isOk, Fields) => {
          console.log("Fields", Fields);
          if (!isOk) {
            for (let key in Fields) {
              let element = Fields[key];
              if (element && element.length > 0) {
                this.$message(element[0].message);
                return;
              }
            }
          } else {
            this.setRowIndex(-1);
          }
        });
      }
    },

    delList(item, index) {
      this.$confirm("是否确认删除？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          let endItem =
            this.sttlmntRc_form.RCitem[this.sttlmntRc_form.RCitem.length - 1];
          this.sttlmntRc_form.RCitem.splice(index, 1);

          if (item.id && !item.isNew) {
            //如果是在修改的时候删除其中一个数据，则保存Id，方便后端做删除操作
            this.form.removeIdList.push(item.id);
          }
          this.setRowIndex(-1);
          //this.saveRow();
        })
        .catch((err) => {
          console.log(err);
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    /**
     * 设置行编辑位置
     * @param {index} val
     */
    setRowIndex(val) {
      this.addRow = val;
      this.editRow = val;
    },

    editOk(row, index) {
      row.isUpdate = true;
      if (this.addRow != -1) {
        this.$refs.refSaveForm.validate((isOk, Fields) => {
          if (!isOk) {
            for (let key in Fields) {
              let element = Fields[key];
              if (element && element.length > 0) {
                this.$message(element[0].message);
                return;
              }
            }
          } else {
            this.setRowIndex(-1);
            this.editRow = index;
          }
        });
      } else {
        this.editRow = index;
      }
    },
    CpnselectFn(e) {
      this.sttlmntRc_form.PayChannel = "";
      this.sttlmntRc_form.RCitem = [];
      this.sttlmntRc_form.Act = "";
      this.sttlmntRc_form.CpnID = e;
    },
    CpnselectAct(e) {
      this.sttlmntRc_form.RCitem = [];
      this.sttlmntRc_form.Act = "";
      this.sttlmntRc_form.PayChannel = e;
      this.cpnactlstoptions = backstage.GetCpnActList(this);
    },
    cpnmatch(val) {
      if (val) {
        let result = [];
        this.cpnoptions.forEach((item) => {
          let matchRes = PinYinMatch.match(item.label, val);
          if (matchRes) {
            result.push(item);
          }
        });
        this.cpnoptions = result;
      } else {
        this.cpnid = "";
        this.cpnoptions = backstage.GeCpntListItems(this);
      }
    },
    cpnactmatch(val) {
      if (val) {
        let result = [];
        this.cpnactlstoptions.forEach((item) => {
          let matchRes = PinYinMatch.match(item.label, val);
          if (matchRes) {
            result.push(item);
          }
        });
        this.cpnactlstoptions = result;
      } else {
        this.cpnactlstoptions = backstage.GetCpnActList(this);
      }
    },
    handleClose() {},
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },

    handleFilter() {
      this.listQuery.page = 1;
      this.fetchData();
    },
    handleCreate() {
      this.sttlmntRc_form.isedit = false;
      this.dialogStatus = "create";
      this.dialogFormVisible = true;
      this.allmony = 0;
      this.sttlmntRc_form = {
        ID: "",
        CpnActID: "",
        RcActID: "",
        CpnID: "",
        PayChannel: "",
        Act: "",
        RcAct: "",
        SttlmntProp: "",
        CrtTime: "",
        Dt: "",
        CrtID: "",
        UptID: "",
        RCitem: [],
        rules: {
          RcActID: [
            { required: true, message: "请选择分账商户号", trigger: "change" },
          ],
        },
        formTpye: 0,
        removeIdList: [],
        bindOrUnBindIdList: [],
      };

      this.setRowIndex(-1);
    },
    deleteClick(row) {
      this.listLoading = true;
      var multis = [];
      var params = new URLSearchParams();
      if (row == undefined || row == "") {
        var arr = this.multipleSelection;
        if (arr == undefined || arr.length <= 0) {
          this.$message({
            showClose: true,
            message: "请至少选中一行",
            type: "error",
          });
          this.listLoading = false;
          return;
        } else {
          for (var i = 0; i < arr.length; i++) {
            multis.push(arr[i].id);
          }
          params.append("delds", JSON.stringify(multis));
        }
      } else {
        multis.push(row.id);
        params.append("delds", JSON.stringify(multis));
      }
      this.$confirm("确认删除吗？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "error",
      })
        .then((a) => {
          this.listLoading = true;
          backstage.Del_sttlmntRc(this, params);
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
          this.listLoading = false;
        });
    },
    handleClick(row) {
      this.sttlmntRc_form.isedit = true;
      this.cpnactlstoptions = [];
      this.sttlmntRc_form.RCitem = [];

      this.sttlmntRc_form.ID = row.id;
      this.sttlmntRc_form.CpnID = row.cpnID;
      this.sttlmntRc_form.PayChannel = row.payChannel;
      this.sttlmntRc_form.Act = row.act;
      this.sttlmntRc_form.Dt = row.dt;
      var allprop = 0;
      row.sttlmntRcActs.forEach((a) => {
        this.sttlmntRc_form.RCitem.push({
          RcActID: a.rcAct,
          SttlmntProp: a.sttlmntProp,
          isNew: true,
          isUpdate: false,
        });
        allprop += parseInt(a.sttlmntProp);
      });
      this.allmony = allprop;
      backstage.GeCpntListItems(this);
      backstage.GetCpnActList(this);
      // 修改信息
      this.dialogFormVisible = true;
    },
    handleClickhsy(row) {
      this.listQuery_log.sttid = row.id;
      this.fetchData_log();
      this.dialogFormVisible_hsy = true;
    },
    saveForm() {
      if (this.sttlmntRc_form.CpnID == "") {
        this.$message({
          message: "请选择企业",
          type: "warning",
        });
      } else if (this.sttlmntRc_form.PayChannel == "") {
        this.$message({
          message: "请选择分账渠道",
          type: "warning",
        });
      } else if (this.sttlmntRc_form.Act == "") {
        this.$message({
          message: "请选择分账主账户",
          type: "warning",
        });
      } else if (this.sttlmntRc_form.RCitem.length <= 0) {
        this.$message({
          message: "请至少添加一个分账账户",
          type: "warning",
        });
      } else if (
        this.sttlmntRc_form.Dt == "" ||
        this.sttlmntRc_form.Dt == undefined
      ) {
        this.$message({
          message: "请填写生效日期",
          type: "warning",
        });
      } else {
        var params = new URLSearchParams();
        params.append("ID", this.sttlmntRc_form.ID);
        params.append("Act", this.sttlmntRc_form.Act);
        params.append("CpnID", this.sttlmntRc_form.CpnID);
        params.append(
          "Dt",
          new Date(this.sttlmntRc_form.Dt).toLocaleDateString()
        );
        params.append("RCitem", JSON.stringify(this.sttlmntRc_form.RCitem));
        backstage.Add_sttlmntRc(this, params);
      }
    },
    fetchData() {
      this.listLoading = true;
      // 搜索
      var params = new URLSearchParams();
      params.append(
        "Parms",
        '{"page":' +
          this.listQuery.page +
          ',"rows":' +
          this.listQuery.limit +
          "}"
      );
      params.append("CpnID", this.listQuery.cpnID);
      params.append("PayChannel", this.listQuery.payChannel   );
      params.append("Act", this.listQuery.act);

      backstage.Get_sttlmntRc_List(this, params);
    },
    fetchData_log() {
      this.listLoading_log = true;
      // 搜索
      var params = new URLSearchParams();
      params.append(
        "Parms",
        '{"page":' +
          this.listQuery_log.page +
          ',"rows":' +
          this.listQuery_log.limit +
          "}"
      );
      params.append("SttlmntRcID", this.listQuery_log.sttid);

      backstage.Get_SttlmntRcLog_List(this, params);
    },
  },
};
// 后台事件
var backstage = {
  GetPyChannelSelectListItems: function (thisobj) {
    SelectAjax(
      "GetPyChannelSelectListItems?val=",
      function (response) {
        var body = response.data;
        thisobj.paytychanneloptions = [];
        body.data.forEach((element) => {
          thisobj.paytychanneloptions.push({
            value: element.value,
            label: element.text,
          });
        });
      },
      function (error) {}
    );
  },
  GeCpntListItems: function (thisobj) {
    SelectAjax(
      "GeCpntListItems",
      function (response) {
        var body = response.data;
        thisobj.cpnoptions = [];
        body.data.forEach((element) => {
          thisobj.cpnoptions.push({
            value: element.value,
            label: element.text,
          });
        });
      },
      function (error) {}
    );
  },
  GetCpnActList: function (thisobj) {
    SelectAjax(
      "GetCpnActList?val=&paychannel=" +
        thisobj.sttlmntRc_form.PayChannel +
        "&cpnid=" +
        thisobj.sttlmntRc_form.CpnID +
        "",
      function (response) {
        var body = response.data;
        thisobj.cpnactlstoptions = [];
        if (body.data.length > 0) {
          thisobj.sttlmntRc_form.Act = body.data[0].value;
        }
        body.data.forEach((element) => {
          thisobj.cpnactlstoptions.push({
            value: element.value,
            label: element.text,
          });
          thisobj.cpnactlstoptionsdec[element.value] = element.text;
        });
      },
      function (error) {}
    );
  },
  // 获取Mngrbaseinfo集合
  Get_sttlmntRc_List: function (thisobj, params) {
    AjaxToken(
      thisobj,
      "Get_sttlmntRc_List",
      params,
      "post",
      function (res) {
        var body = res.data.data;
        thisobj.sttlmntRc_Data = body.rows;
        thisobj.listQuery.page = body.page;
        thisobj.listQuery.total = body.records;
        thisobj.listLoading = false;
      },
      function (err) {}
    );
  },
  // 获取Mngrbaseinfo集合
  Get_SttlmntRcLog_List: function (thisobj, params) {
    AjaxToken(
      thisobj,
      "Get_SttlmntRcLog_List",
      params,
      "post",
      function (res) {
        var body = res.data.data;
        thisobj.sttlmntRcLog_Data = body.rows;
        thisobj.listQuery_log.page = body.page;
        thisobj.listQuery_log.total = body.records;
        thisobj.listLoading_log = false;
      },
      function (err) {}
    );
  },
  Add_sttlmntRc: function (thisobj, params) {
    AjaxToken(
      thisobj,
      "Add_sttlmntRc",
      params,
      "post",
      function (res) {
        var body = res.data;
        if (body.success) {
          thisobj.$message({
            showClose: true,
            message: body.message,
            type: "success",
            duration: 2000,
          });
          thisobj.fetchData();
          thisobj.dialogFormVisible = false;
        } else {
          thisobj.$message({
            showClose: true,
            message: body.message,
            type: "error",
          });
        }
      },
      function (err) {}
    );
  },
  Del_sttlmntRc: function (thisobj, params) {
    AjaxToken(
      thisobj,
      "Del_sttlmntRc",
      params,
      "post",
      function (res) {
        thisobj.listLoading = true;
        var body = res.data;
        if (body.success) {
          thisobj.$message({
            showClose: true,
            message: body.message,
            type: "success",
            duration: 2000,
          });
          thisobj.fetchData();
          thisobj.dialogFormVisible = false;
        } else {
          thisobj.$message({
            showClose: true,
            message: body.message,
            type: "error",
          });
        }
      },
      function (err) {}
    );
  },
};
</script>

<style>
.dialogFormVisible_hsy .el-dialog .el-dialog__body {
  padding: 30px 20px 30px 20px !important;
  color: #606266;
  font-size: 14px;
  word-break: break-all;
}
.sumlimitMny {
  height: 30px;
  font-size: 14px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  line-height: 28px;
  color: #959ea8;
  opacity: 1;
  float: right;
  margin-right: 10px;
}
</style>